#include <stdio.h>

int main()
{
	float score;
	scanf("%f",&score);
	int sign=(int)score/10;
	switch(sign){
		case 10:
		case 9:printf("%.2f A",score);break;
		case 8:printf("%.2f B",score);break;
		case 7:printf("%.2f C",score);break;
		case 6:printf("%.2f D",score);break;
		default:printf("%.2f E",score);break;
	}
	return 0;
}
